package com.kyp.thrift;

import org.apache.thrift.server.TServer;
import org.apache.thrift.server.TThreadPoolServer;
import org.apache.thrift.transport.TServerSocket;
import org.apache.thrift.transport.TServerTransport;

public class KYPServer {
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static void main(String[] args) throws Exception{
		
		TServerTransport serverTransport = new TServerSocket(9898);
		
		final KYPService.Processor processor =
				new KYPService.Processor(new KYPHandler());
		
		TServer server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor));
		
		System.out.println("start!!");
		server.serve();
		
	}
}
